'use strict';
let SystemInfo = null;

export default () => {
  if (SystemInfo) return SystemInfo;
  const { statusBarHeight } = wx.getSystemInfoSync();
  const StatusBar = statusBarHeight;
  const Custom = wx.getMenuButtonBoundingClientRect();
  const CustomBar = Custom.bottom + Custom.top - StatusBar;
  SystemInfo = { Custom, CustomBar, StatusBar };
  return SystemInfo;
};
